class C
  def initialize
    @x = 1
  end
end

class D
  def twisted_method
    @y = 2
    C.new.instance_exec(@y) do|y|
      p "@x: #{@x}, @y: #{y}"
    end
  end
end

D.new.twisted_method # "@x: 1, @y: 2"

p BasicObject.instance_methods # [:!, :equal?, :__send__, :__id__, :==, :!=, :instance_eval, :instance_exec]